Skip to content

fix: remove kubernetes cli call when there is no config#4841

Open
dustinblackman wants to merge 1 commit intolima-vm:masterfrom
dustinblackman:fix-kubernetes-call-with-no-config
Open

fix: remove kubernetes cli call when there is no config#4841
dustinblackman wants to merge 1 commit intolima-vm:masterfrom
dustinblackman:fix-kubernetes-call-with-no-config

Conversation

@dustinblackman
Copy link
Copy Markdown

@dustinblackman dustinblackman commented Apr 14, 2026

Overview

Fixes #4791

When the guest agent starts up the kubernetes service watcher, it is incorrectly calling kubectl when no kube config exists, falling back to the default kubernetes endpoint of 127.0.0.1:8080. This PR adds a condition where if no kubernetes config is found, the function exits early without calling kubectl. The loop to check for if an kubernetes config exists remains unchanged.

Signed-off-by: Dustin Blackman <github@dustinblackman.com>
Copy link
Copy Markdown
Member

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM

@jandubois jandubois added this to the v2.1.2 milestone Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kubernetes service watcher is always enabled, no matter the template used

2 participants